from django.conf.urls.defaults import *
from django.views.generic import list_detail
from django.views.generic.simple import direct_to_template
from winlog.log_dj.models import Winlog
from winlog.log_dj.forms import ContactForm1, ContactForm2, ContactWizard

def i18n_javascript(request):
    return admin.site.i18n_javascript(request)



# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

winlog_info = {
    "queryset": Winlog.objects.all(),
    "template_object_name" :"winlog",
}


urlpatterns = patterns('',
    # Example:
    (r'^contact/$', ContactWizard([ContactForm1, ContactForm2])),
    (r'^search3/$','winlog.log_dj.views.search3'),
    (r'^search2/$','winlog.log_dj.views.search2'),
    (r'^search1/$','winlog.log_dj.views.search1'),
    (r'^search/$','winlog.log_dj.views.search'),
    (r'^winlog/$', list_detail.object_list, winlog_info),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/root/winlog/winlog/media'}),
    (r'^missing-admin-media-prefix/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/root/winlog/winlog/media'}),
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^about/$',direct_to_template,{'template': 'about.html'}), 
    # Uncomment the next line to enable the admin:
    (r'^admin/jsi18n', i18n_javascript),
    (r'^admin/', include(admin.site.urls)),
    (r'^log_dj/$', 'winlog.log_dj.views.index'),
)
